.TH deductionguidesforstd::tuple 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
deductionguidesforstd::tuple \- deductionguidesforstd::tuple

.SH Synopsis
   Defined in header <tuple>
   template<class... UTypes>                                          \fB(1)\fP \fI(since C++17)\fP
   tuple(UTypes...) -> tuple<UTypes...>;
   template<class T1, class T2>                                       \fB(2)\fP \fI(since C++17)\fP
   tuple(std::pair<T1, T2>) -> tuple<T1, T2>;
   template<class Alloc, class... UTypes>                             \fB(3)\fP \fI(since C++17)\fP
   tuple(std::allocator_arg_t, Alloc, UTypes...) -> tuple<UTypes...>;
   template<class Alloc, class T1, class T2>
   tuple(std::allocator_arg_t, Alloc, std::pair<T1, T2>) -> tuple<T1, \fB(4)\fP \fI(since C++17)\fP
   T2>;
   template<class Alloc, class... UTypes>
   tuple(std::allocator_arg_t, Alloc, tuple<UTypes...>) ->            \fB(5)\fP \fI(since C++17)\fP
   tuple<UTypes...>;

   These deduction guides are provided for std::tuple to account for the edge cases
   missed by the implicit deduction guides, in particular, non-copyable arguments and
   array to pointer conversion.

.SH Example


// Run this code

 #include <tuple>
 int main()
 {
     int a[2], b[3], c[4];
     std::tuple t1{a, b, c}; // explicit deduction guide is used in this case
 }
